<!doctype html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

	<head>

		<meta charset="UTF-8">
        <title>IoT-Agriculture</title>
        <meta name="renderer" content="webkit|ie-comp|ie-stand">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <meta http-equiv="Cache-Control" content="no-siteapp" />
        <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
        <link rel="stylesheet" href="/static/css/font.css">
        <link rel="stylesheet" href="/static/css/weadmin.css">
        <script type="text/javascript" src="/static/lib/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="/static/lib/jquery-2.1.3.min.js"></script>

	</head>

	<body>
		<!-- 顶部开始 -->
		<div class="container">
			<div class="logo">
				<a href="index.html">Agriculture Admin</a>
			</div>
			<div class="left_open">
				<i title="展开左侧栏" class="iconfont">&#xe699;</i>
			</div>
			<ul class="layui-nav right" lay-filter="">
				<li class="layui-nav-item">
					<a href="javascript:;">Admin</a>
				</li>
				<li class="layui-nav-item to-index">
					<a onclick="logout()">退出</a>
				</li>
			</ul>

		</div>
		<!-- 顶部结束 -->
		<!-- 中部开始 -->
		<!-- 左侧菜单开始 -->
		<div class="left-nav">
			<div id="side-nav">
				<ul id="nav">
					<li>
						<a href="javascript:;">
							<i class="iconfont">&#xe6b8;</i>
							<cite>控制台</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="/greenhouse/show_greenhouse">
									<i class="iconfont">&#xe6a7;</i>
									<cite>大棚列表</cite>
								</a>
							</li>
							<li>
								<a _href="/com/showCom">
									<i class="iconfont">&#xe6a7;</i>
									<cite>传感器列表</cite>
								</a>
							</li>
						</ul>
					</li>
					<li>
						<a href="javascript:;">
							<i class="iconfont">&#xe723;</i>
							<cite>门禁系统</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="/access/showWorkerList">
									<i class="iconfont">&#xe6a7;</i>
									<cite>人员列表</cite>
								</a>
							</li>
							<li>
								<a _href="/access/showLoginLog">
									<i class="iconfont">&#xe6a7;</i>
									<cite>门禁记录</cite>
								</a>
							</li>
							<li>
								<a _href="/access/showRFID">
									<i class="iconfont">&#xe6a7;</i>
									<cite>RFID列表</cite>
								</a>
							</li>
						</ul>
					</li>
					<li><!--finished-->
						<a href="javascript:;">
							<i class="iconfont">&#xe726;</i>
							<cite>管理员账号</cite>
							<i class="iconfont nav_right">&#xe697;</i>
						</a>
						<ul class="sub-menu">
							<li>
								<a _href="/account/showPage">
									<i class="iconfont">&#xe6a7;</i>
									<cite>账号管理</cite>
								</a>
							</li>
						</ul>
					</li>
				</ul>
			</div>
		</div>
		<!-- <div class="x-slide_left"></div> -->
		<!-- 左侧菜单结束 -->
		<!-- 右侧主体开始 -->
		<div class="page-content">
			<div class="layui-tab tab" lay-filter="wenav_tab" id="WeTabTip" lay-allowclose="true">
				<ul class="layui-tab-title" id="tabName">
					<li>大棚列表</li>
				</ul>
				<div class="layui-tab-content">
					<div class="layui-tab-item layui-show">
						<iframe src='/greenhouse/show_greenhouse' frameborder="0" scrolling="yes" class="weIframe"></iframe>
					</div>
				</div>
			</div>
		</div>
		<div class="page-content-bg"></div>
		<!-- 右侧主体结束 -->
		<!-- 中部结束 -->
		<!-- 底部开始 -->
		<div class="footer">
			<div class="copyright">Copyright ©2018 WeAdmin v1.0 All Rights Reserved</div>
		</div>
		<!-- 底部结束 -->
		<script type="text/javascript">
			layui.config({
			  base: '/static/js/'
			  ,version: '101100'
			}).use('admin');

			function logout() {

				var con = confirm("确定要退出吗？");
				if (con == true){
					$.ajax({
						type : "GET",
						url : "/admin/logout",
						data : {},
						async : false,
						cache : false,
						success : function(data) {
							if (JSON.parse(data).msg == "success") {
								window.location.href = "/admin/login";
							}else {
								alert("错误操作");
							}
						},
						error : function() {
							alert("系统错误");
						}
					});
				} else {}
			}
		</script>
	</body>
	<!--Tab菜单右键弹出菜单-->
	<ul class="rightMenu" id="rightMenu">
        <li data-type="fresh">刷新</li>
        <li data-type="current">关闭当前</li>
        <li data-type="other">关闭其它</li>
        <li data-type="all">关闭所有</li>
    </ul>

</html>